package com.zondy.mapgis.domain.psmap;

import com.zondy.mapgis.common.core.annotation.Excel;
import com.zondy.mapgis.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

@Schema(name = "数据目录对象")
public class AppData extends BaseEntity {
   private static final long serialVersionUID = 1L;
   @Schema(
      description = "数据节点ID"
   )
   private Long dataId;
   @Schema(
      description = "数据节点名称"
   )
   @Excel(
      name = "数据节点名称"
   )
   private @NotBlank(
   message = "数据节点名称不能为空"
) @Size(
   max = 100,
   message = "数据节点名称长度不能超过100个字符"
) String dataName;
   @Schema(
      description = "父数据节点ID"
   )
   @Excel(
      name = "父数据节点ID"
   )
   private Long parentId;
   @Schema(
      description = "祖级列表"
   )
   private String ancestors;
   @Schema(
      description = "显示顺序"
   )
   @Excel(
      name = "显示顺序"
   )
   private Integer orderNum;
   @Schema(
      description = "描述"
   )
   @Excel(
      name = "描述"
   )
   private String description;
   @Schema(
      description = "节点类型"
   )
   @Excel(
      name = "节点类型"
   )
   private Integer dataType;
   @Schema(
      description = "节点通用属性"
   )
   @Excel(
      name = "节点通用属性"
   )
   private String properties;
   @Schema(
      description = "节点图层属性"
   )
   @Excel(
      name = "节点图层属性"
   )
   private String layerProperties;
   @Schema(
      description = "节点扩展属性"
   )
   @Excel(
      name = "节点扩展属性"
   )
   private String extendedProperties;
   @Schema(
      description = "子节点"
   )
   private List<AppData> children = new ArrayList();

   public Long getDataId() {
      return this.dataId;
   }

   public String getDataName() {
      return this.dataName;
   }

   public Long getParentId() {
      return this.parentId;
   }

   public String getAncestors() {
      return this.ancestors;
   }

   public Integer getOrderNum() {
      return this.orderNum;
   }

   public String getDescription() {
      return this.description;
   }

   public Integer getDataType() {
      return this.dataType;
   }

   public String getProperties() {
      return this.properties;
   }

   public String getLayerProperties() {
      return this.layerProperties;
   }

   public String getExtendedProperties() {
      return this.extendedProperties;
   }

   public List<AppData> getChildren() {
      return this.children;
   }

   public AppData setDataId(Long dataId) {
      this.dataId = dataId;
      return this;
   }

   public AppData setDataName(String dataName) {
      this.dataName = dataName;
      return this;
   }

   public AppData setParentId(Long parentId) {
      this.parentId = parentId;
      return this;
   }

   public AppData setAncestors(String ancestors) {
      this.ancestors = ancestors;
      return this;
   }

   public AppData setOrderNum(Integer orderNum) {
      this.orderNum = orderNum;
      return this;
   }

   public AppData setDescription(String description) {
      this.description = description;
      return this;
   }

   public AppData setDataType(Integer dataType) {
      this.dataType = dataType;
      return this;
   }

   public AppData setProperties(String properties) {
      this.properties = properties;
      return this;
   }

   public AppData setLayerProperties(String layerProperties) {
      this.layerProperties = layerProperties;
      return this;
   }

   public AppData setExtendedProperties(String extendedProperties) {
      this.extendedProperties = extendedProperties;
      return this;
   }

   public AppData setChildren(List<AppData> children) {
      this.children = children;
      return this;
   }

   public String toString() {
      return "AppData(dataId=" + this.getDataId() + ", dataName=" + this.getDataName() + ", parentId=" + this.getParentId() + ", ancestors=" + this.getAncestors() + ", orderNum=" + this.getOrderNum() + ", description=" + this.getDescription() + ", dataType=" + this.getDataType() + ", properties=" + this.getProperties() + ", layerProperties=" + this.getLayerProperties() + ", extendedProperties=" + this.getExtendedProperties() + ", children=" + this.getChildren() + ")";
   }

   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof AppData)) {
         return false;
      } else {
         AppData other = (AppData)o;
         if (!other.canEqual(this)) {
            return false;
         } else if (!super.equals(o)) {
            return false;
         } else {
            label145: {
               Object this$dataId = this.getDataId();
               Object other$dataId = other.getDataId();
               if (this$dataId == null) {
                  if (other$dataId == null) {
                     break label145;
                  }
               } else if (this$dataId.equals(other$dataId)) {
                  break label145;
               }

               return false;
            }

            Object this$parentId = this.getParentId();
            Object other$parentId = other.getParentId();
            if (this$parentId == null) {
               if (other$parentId != null) {
                  return false;
               }
            } else if (!this$parentId.equals(other$parentId)) {
               return false;
            }

            Object this$orderNum = this.getOrderNum();
            Object other$orderNum = other.getOrderNum();
            if (this$orderNum == null) {
               if (other$orderNum != null) {
                  return false;
               }
            } else if (!this$orderNum.equals(other$orderNum)) {
               return false;
            }

            label124: {
               Object this$dataType = this.getDataType();
               Object other$dataType = other.getDataType();
               if (this$dataType == null) {
                  if (other$dataType == null) {
                     break label124;
                  }
               } else if (this$dataType.equals(other$dataType)) {
                  break label124;
               }

               return false;
            }

            Object this$dataName = this.getDataName();
            Object other$dataName = other.getDataName();
            if (this$dataName == null) {
               if (other$dataName != null) {
                  return false;
               }
            } else if (!this$dataName.equals(other$dataName)) {
               return false;
            }

            Object this$ancestors = this.getAncestors();
            Object other$ancestors = other.getAncestors();
            if (this$ancestors == null) {
               if (other$ancestors != null) {
                  return false;
               }
            } else if (!this$ancestors.equals(other$ancestors)) {
               return false;
            }

            label103: {
               Object this$description = this.getDescription();
               Object other$description = other.getDescription();
               if (this$description == null) {
                  if (other$description == null) {
                     break label103;
                  }
               } else if (this$description.equals(other$description)) {
                  break label103;
               }

               return false;
            }

            Object this$properties = this.getProperties();
            Object other$properties = other.getProperties();
            if (this$properties == null) {
               if (other$properties != null) {
                  return false;
               }
            } else if (!this$properties.equals(other$properties)) {
               return false;
            }

            label89: {
               Object this$layerProperties = this.getLayerProperties();
               Object other$layerProperties = other.getLayerProperties();
               if (this$layerProperties == null) {
                  if (other$layerProperties == null) {
                     break label89;
                  }
               } else if (this$layerProperties.equals(other$layerProperties)) {
                  break label89;
               }

               return false;
            }

            Object this$extendedProperties = this.getExtendedProperties();
            Object other$extendedProperties = other.getExtendedProperties();
            if (this$extendedProperties == null) {
               if (other$extendedProperties != null) {
                  return false;
               }
            } else if (!this$extendedProperties.equals(other$extendedProperties)) {
               return false;
            }

            Object this$children = this.getChildren();
            Object other$children = other.getChildren();
            if (this$children == null) {
               if (other$children == null) {
                  return true;
               }
            } else if (this$children.equals(other$children)) {
               return true;
            }

            return false;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof AppData;
   }

   public int hashCode() {
      boolean PRIME = true;
      int result = super.hashCode();
      Object $dataId = this.getDataId();
      result = result * 59 + ($dataId == null ? 43 : $dataId.hashCode());
      Object $parentId = this.getParentId();
      result = result * 59 + ($parentId == null ? 43 : $parentId.hashCode());
      Object $orderNum = this.getOrderNum();
      result = result * 59 + ($orderNum == null ? 43 : $orderNum.hashCode());
      Object $dataType = this.getDataType();
      result = result * 59 + ($dataType == null ? 43 : $dataType.hashCode());
      Object $dataName = this.getDataName();
      result = result * 59 + ($dataName == null ? 43 : $dataName.hashCode());
      Object $ancestors = this.getAncestors();
      result = result * 59 + ($ancestors == null ? 43 : $ancestors.hashCode());
      Object $description = this.getDescription();
      result = result * 59 + ($description == null ? 43 : $description.hashCode());
      Object $properties = this.getProperties();
      result = result * 59 + ($properties == null ? 43 : $properties.hashCode());
      Object $layerProperties = this.getLayerProperties();
      result = result * 59 + ($layerProperties == null ? 43 : $layerProperties.hashCode());
      Object $extendedProperties = this.getExtendedProperties();
      result = result * 59 + ($extendedProperties == null ? 43 : $extendedProperties.hashCode());
      Object $children = this.getChildren();
      result = result * 59 + ($children == null ? 43 : $children.hashCode());
      return result;
   }
}
